package dao.jpa;

import java.util.List;

import vo.Favorite;
import dao.FavoriteDAO;

public class FavoriteDAOJpaImpl extends GenericDaoJpaImpl<Favorite, Long> implements FavoriteDAO {

	public FavoriteDAOJpaImpl() {
		super(Favorite.class);
	}
	public long findTotalCount() {
		return super.executeFinderCount("Favorite.findTotalCount");
	}

	public List<Favorite> findAll() {
		return super.executeFinder("Favorite.findAll");
	}

	public List<Favorite> findByUserId(long userId) {
		return super.executeFinder("Favorite.findByUserId", userId);
	}

	public Favorite findByUserIdItemId(long userId,String itemId) {
		return super.executeSingleFinder("Favorite.findByUserIdItemId", userId,itemId);
	}
	public List<Favorite> findByUserId(int start, int pageSize, long userId) {
		return super.executeFinderPage("Favorite.findByUserId", start, pageSize, userId);
	}
}
